import { MockMethod } from 'vite-plugin-mock';
import { resultPageSuccess, resultSuccess } from '../_util';

const demoList = (() => {
  const result: any[] = [];
  for (let index = 0; index < 60; index++) {
    result.push({
      id: `${index}`,
      uuid: '@integer(100001024912920012,900001024912920012)',
      aesText: '@integer(100001024912920012,900001024912920012)',
      createDate: '@time',
    });
  }
  return result;
})();

enum Api {
  list = '/deleoaescipher/deleoAesCipher/list',
  save = '/deleoaescipher/deleoAesCipher/add',
  edit = '/deleoaescipher/deleoAesCipher/edit',
  deleteOne = '/deleoaescipher/deleoAesCipher/delete',
  deleteBatch = '/deleoaescipher/deleoAesCipher/deleteBatch',
  importExcel = '/deleoaescipher/deleoAesCipher/importExcel',
  exportXls = '/deleoaescipher/deleoAesCipher/exportXls',
}

const prefix = '/jeecgboot';
export default [
  // {
  //   url: prefix + Api.list,
  //   timeout: 1000,
  //   method: 'get',
  //   response: ({ query }) => {
  //     const { page = 1, pageSize = 20 } = query;
  //     return resultPageSuccess(page, pageSize, demoList);
  //   },
  // },
  // {
  //   url: prefix + Api.save,
  //   timeout: 1000,
  //   method: 'post',
  //   response: () => {
  //     return resultSuccess('ok');
  //   },
  // },
  // {
  //   url: prefix + Api.edit,
  //   timeout: 1000,
  //   method: 'post',
  //   response: () => {
  //     return resultSuccess('ok');
  //   },
  // },
  // {
  //   url: prefix + Api.deleteOne,
  //   timeout: 1000,
  //   method: 'delete',
  //   response: () => {
  //     return resultSuccess('ok');
  //   },
  // },
  // {
  //   url: prefix + Api.importExcel,
  //   timeout: 1000,
  //   method: 'post',
  //   response: () => {
  //     return resultSuccess('ok');
  //   },
  // },
  // {
  //   url: prefix + Api.exportXls,
  //   timeout: 1000,
  //   method: 'get',
  //   response: () => {
  //     return resultSuccess('ok');
  //   },
  // },
] as MockMethod[];
